package poc.myrun;

import org.docx4j.wml.R;

/**
 * Created by zhangleilei on 2018/10/11.
 */
public class MyRun_Type2 extends MyRun {
    public MyRun_Type2(R run){super(run);}
    public String getLeftStr(String engSnippet,String eValue){
        String pattern="\""+eValue+"\"";
        int value_index = engSnippet.indexOf(pattern);
        return engSnippet.substring(0,value_index+1);
    }
    public String  getRightStr(String engSnippet,String eValue){
        String pattern="\""+eValue+"\"";
        int value_index = engSnippet.indexOf(pattern);
        return engSnippet.substring(value_index+eValue.length()+1);
    }
    public boolean find(String engSnippet,String eValue){
        String pattern="\""+eValue+"\"";
        return engSnippet.indexOf(pattern) !=-1;
    }
}
